<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>风行融媒体 - 设置</title>
  <link rel="stylesheet" href="../styles/common.css">
  <link rel="stylesheet" href="../styles/settings.css">
</head>
<body>
  <div class="app-container">
    <!-- 标题栏 -->
    <div class="title-bar">
      <div class="app-icon">
        <span>⚙️</span>
        <span>设置</span>
      </div>
      <div class="controls">
        <button id="cloud-sync-btn" title="云同步">
          <svg t="1761036139862" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5278" width="19" height="19"><path d="M806.7072 470.528A290.816 290.816 0 0 0 252.16 371.4048a217.5488 217.5488 0 0 0-9.8304 428.1344 149.1456 149.1456 0 0 0 37.0176 4.352h504.4224a167.8336 167.8336 0 0 0 167.7824-167.7824c1.0752-82.7904-62.1056-154.6752-144.896-165.5808z m-44.6464 44.6464a26.2656 26.2656 0 0 0 19.6096 7.6288h4.352a113.3056 113.3056 0 0 1 0 226.6112H280.5248a114.3808 114.3808 0 0 1-26.1632-3.2768 164.1984 164.1984 0 0 1 19.6096-324.6592 27.3408 27.3408 0 0 0 22.9888-17.408 237.3632 237.3632 0 0 1 458.6496 84.992v3.2768c-1.0752 10.9056 1.0752 17.408 6.5536 22.8864z" p-id="5279" fill="#515151"></path><path d="M489.6768 557.6704a23.1936 23.1936 0 0 0-30.72 0l-27.2384 27.2384V458.5472a21.8112 21.8112 0 1 0-43.5712 0v126.3616l-27.2384-27.2384a23.1936 23.1936 0 0 0-30.72 0 21.0432 21.0432 0 0 0 0 30.72l64.256 64.256c1.0752 1.0752 2.2016 1.0752 3.2768 2.2016s2.2016 1.0752 3.2768 2.2016c1.0752 0 2.2016 1.0752 3.2768 1.0752h10.9056c1.0752 0 2.2016-1.0752 3.2768-1.0752a22.784 22.784 0 0 0 6.5536-4.352l64.256-64.256a21.0432 21.0432 0 0 0 0-30.72zM670.72 508.672l-64.4608-64.3072-1.0752-1.0752c-1.0752 0-1.0752-1.0752-2.2016-1.0752s-1.0752-1.0752-2.2016-1.0752-1.0752-1.0752-2.2016-1.0752-1.0752 0-2.2016-1.0752h-13.056c-1.0752 0-1.0752 0-2.2016 1.0752a1.0752 1.0752 0 0 0-1.0752 1.0752c-1.0752 0-1.0752 1.0752-2.2016 1.0752l-1.0752 1.0752c-1.0752 0-1.0752 1.0752-2.2016 1.0752L510.3616 508.672a21.5552 21.5552 0 0 0 30.72 30.72L568.32 512v126.3616a21.8112 21.8112 0 0 0 43.5712 0V512l27.2384 27.2384a21.0432 21.0432 0 0 0 30.72 0 20.48 20.48 0 0 0 1.0752-30.72z" p-id="5280" fill="#515151"></path></svg>
        </button>
        <button id="minimize-btn">−</button>
        <button id="maximize-btn">□</button>
        <button id="close-btn">×</button>
      </div>
    </div>

    <!-- 主内容 -->
    <div class="settings-container">
      <!-- 侧边栏 -->
      <div class="settings-sidebar">
        <div class="settings-nav">
          <div class="nav-item active" data-tab="general">
            <span class="nav-icon">🎛️</span>
            <span>常规设置</span>
          </div>
          <div class="nav-item" data-tab="transfer">
            <span class="nav-icon">🚀</span>
            <span>传输设置</span>
          </div>
          <div class="nav-item" data-tab="ftp">
            <span class="nav-icon">🌐</span>
            <span>FTP设置</span>
          </div>
          <div class="nav-item" data-tab="appearance">
            <span class="nav-icon">🎨</span>
            <span>外观设置</span>
          </div>
          <div class="nav-item" data-tab="about">
            <span class="nav-icon">ℹ️</span>
            <span>关于</span>
          </div>
        </div>
        <div class="sidebar-footer">
          <button class="btn btn-secondary" id="back-btn">返回主页</button>
        </div>
      </div>

      <!-- 内容区 -->
      <div class="settings-content">
        <!-- 常规设置 -->
        <div class="settings-tab active" id="tab-general">
          <h2>常规设置</h2>
          <div class="settings-section">
            <div class="setting-item">
              <label class="setting-label">
                <input type="checkbox" id="auto-start">
                <span>开机自动启动</span>
              </label>
              <p class="setting-desc">系统启动时自动运行应用程序</p>
            </div>
            <div class="setting-item">
              <label class="setting-label">
                <input type="checkbox" id="minimize-to-tray">
                <span>最小化到系统托盘</span>
              </label>
              <p class="setting-desc">关闭窗口时最小化到托盘而不是退出</p>
            </div>
            <div class="setting-item">
              <label class="setting-label">
                <input type="checkbox" id="confirm-delete">
                <span>删除文件时确认</span>
              </label>
              <p class="setting-desc">删除文件前显示确认对话框</p>
            </div>
          </div>
        </div>

        <!-- 传输设置 -->
        <div class="settings-tab" id="tab-transfer">
          <h2>传输设置</h2>
          <div class="settings-section">
            <div class="setting-item">
              <label class="setting-label">最大并发传输数</label>
              <input type="number" id="max-concurrent" min="1" max="10" value="3" class="input">
              <p class="setting-desc">同时进行的文件传输数量（1-10）</p>
            </div>
            <div class="setting-item">
              <label class="setting-label">分片大小（MB）</label>
              <input type="number" id="chunk-size" min="1" max="100" value="5" class="input">
              <p class="setting-desc">大文件分片上传的每片大小</p>
            </div>
            <div class="setting-item">
              <label class="setting-label">
                <input type="checkbox" id="auto-retry">
                <span>传输失败自动重试</span>
              </label>
              <p class="setting-desc">传输失败时自动重试最多3次</p>
            </div>
            <div class="setting-item">
              <label class="setting-label">
                <input type="checkbox" id="skip-existing">
                <span>跳过已存在的文件</span>
              </label>
              <p class="setting-desc">上传时跳过服务器上已存在的同名文件</p>
            </div>
          </div>
        </div>

        <!-- FTP设置 -->
        <div class="settings-tab" id="tab-ftp">
          <h2>FTP设置</h2>
          <div class="settings-section">
            <div class="setting-item">
              <label class="setting-label">FTP服务器地址</label>
              <input type="text" id="ftp-host" placeholder="drive.kbin.cc" class="input">
            </div>
            <div class="setting-item">
              <label class="setting-label">FTP端口</label>
              <input type="number" id="ftp-port" value="21" class="input">
            </div>
            <div class="setting-item">
              <label class="setting-label">连接超时（秒）</label>
              <input type="number" id="ftp-timeout" min="5" max="60" value="30" class="input">
            </div>
            <div class="setting-item">
              <label class="setting-label">
                <input type="checkbox" id="ftp-passive">
                <span>使用被动模式</span>
              </label>
              <p class="setting-desc">推荐在防火墙后使用被动模式</p>
            </div>
          </div>
        </div>

        <!-- 外观设置 -->
        <div class="settings-tab" id="tab-appearance">
          <h2>外观设置</h2>
          <div class="settings-section">
            <div class="setting-item">
              <label class="setting-label">主题</label>
              <select id="theme" class="input">
                <option value="light">浅色</option>
                <option value="dark">深色</option>
                <option value="auto">跟随系统</option>
              </select>
            </div>
            <div class="setting-item">
              <label class="setting-label">字体大小</label>
              <select id="font-size" class="input">
                <option value="small">小</option>
                <option value="medium">中</option>
                <option value="large">大</option>
              </select>
            </div>
          </div>
        </div>

        <!-- 关于 -->
        <div class="settings-tab" id="tab-about">
          <h2>关于</h2>
          <div class="about-section">
            <div class="about-logo">📁</div>
            <h3>FTP Rush</h3>
            <p class="version">版本 1.0.0</p>
            <p class="description">高效的FTP文件传输工具</p>
            <div class="about-links">
              <a href="#" class="about-link">官方网站</a>
              <a href="#" class="about-link">用户手册</a>
              <a href="#" class="about-link">报告问题</a>
            </div>
            <p class="copyright">© 2024 FTP Rush. All rights reserved.</p>
          </div>
        </div>

        <!-- 保存按钮 -->
        <div class="settings-footer">
          <button class="btn btn-primary" id="save-btn">保存设置</button>
          <button class="btn btn-secondary" id="reset-btn">恢复默认</button>
        </div>
      </div>
    </div>
  </div>

  <script src="../utils/common.js"></script>
  <script src="../scripts/settings.js"></script>
</body>
</html>
